import request from "@/utils/request";
import { RosterQuery, Roster } from "./types";
import { AxiosPromise } from "axios";

export function getRosterPage(
  queryParams?: RosterQuery
): AxiosPromise<PageResult<Roster[]>> {
  return request({
    url: "/admin/roster/index",
    method: "get",
    params: queryParams,
  });
}

export function getAddressBook(
  queryParams?: RosterQuery
): AxiosPromise<Roster[]> {
  return request({
    url: "/admin/roster/addressBook",
    method: "get",
    params: queryParams,
  });
}
